//
//  ViewController.swift
//  CNMHttps
//
//  Created by MrHong on 01/31/2023.
//  Copyright (c) 2023 MrHong. All rights reserved.
//

import CNMHttps
import UIKit

class ViewController: UIViewController {
    // MARK: - property

    // MARK: - subview

    // MARK: - life cycle

    override func viewDidLoad() {
        super.viewDidLoad()

//        let queryParameters = [
//            "cids": 36,
//            "pageno": 1,
//            "count": 5,
//        ]
//
//        CNMHttps.cnm_get(url: "http://wp.birdpaper.com.cn/intf/GetListByCategory", parameters: queryParameters) { data in
//            print(data)
//        } fail: { error in
//            print("失败:\(error)")
//        }

        let params = [
            "businessCode": "2",
            "appType": "2",
            "versionCode": "2023110802"
        ]
        
        let url = "https://gateway.ngrok.i84.com.cn" + "1" + "/sys/app/unauth/sysVersionPlus/queryLatestByBusinessAppTypeVerCode"
        
        CNMHttps.cnm_post(url: url, parameters: params) { data in
            print("成功：\(data)")
        } fail: { error in
            print("错误：\(error)")
        }

    }
}
